package T;

import java.util.Scanner;

public class tt {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String[] name = new String[5];
        int[] num= new int[5];
        int[] javanum= new int[5];
        int[] htmlnum= new int[5];
        int[] scnum= new int[5];
        int[] allnum= new int[5];
        for(int i=0;i<5;i++) {
            System.out.println("请输入你的名字");
            String name1 = input.next();
            name[i] = name1;


            System.out.println("请输入你的学号");
            int num1 = input.nextInt();
            num[i] = num1;


            System.out.println("请输入你的java成绩");
            int javanum1 = input.nextInt();
            javanum[i] = javanum1;
            if(javanum[i]>100||javanum[i]<0) {
                System.out.println("请重新输入java成绩");
                int javanum2 = input.nextInt();
                javanum[i] = javanum2;
            }


            System.out.println("请输入你的html成绩");
            int htmlnum1 = input.nextInt();
            htmlnum[i] = htmlnum1;
            if(htmlnum[i]>100||htmlnum[i]<0) {
                System.out.println("请重新输入html成绩");
                int htmlnum2 = input.nextInt();
                htmlnum[i] = htmlnum2;
            }



            System.out.println("请输入你的sciput成绩");
            int scnum1 = input.nextInt();
            scnum[i] = scnum1;
            if(scnum[i]>100||scnum[i]<0) {
                System.out.println("请重新输入sciput成绩");
                int scnum2 = input.nextInt();
                scnum[i] = scnum2;
            }


            allnum[i] = javanum[i] + htmlnum[i] + scnum[i];
        }
        System.out.println("请问您要查询几号学生？");
        int find = input.nextInt();
        int findnum = find+1;
        System.out.println("该生情况为："+ "姓名:"+name[findnum]+"  学号："+find+"号"+"  java成绩："+javanum[findnum]+"  html成绩："+htmlnum[findnum]+"  javascript成绩："+scnum[findnum]+"  总成绩："+allnum[findnum]);

    }

}
